<template>
	<view>
		<view class="tabbar">
			<u-tabbar :value="value1" @change="tabbarChange" :fixed="false" :placeholder="false"
				:safeAreaInsetBottom="false">
				<u-tabbar-item text="求职者" icon="home"></u-tabbar-item>
				<u-tabbar-item text="聊天" icon="photo"></u-tabbar-item>
				<u-tabbar-item text="通讯录" icon="play-right"></u-tabbar-item>
				<u-tabbar-item text="我的" icon="account"></u-tabbar-item>
			</u-tabbar>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			tabindex: {
				type: String
			}
		},
		data() {
			return {
				value1: 0,
				taburl: '/pages/job-seekers/job-seeker1/index'
			};
		},
		onLoad() {
			this.tabbarChange()
			console.log(this.props, 'llll')
		},
		methods: {
			tabbarChange(tabbarIndex) {
				// console.log('click1', tabbarIndex);
				// this.value1 = tabbarIndex
				tabbarIndex === 0 ? this.taburl = '/pages/job-seekers/job-seeker1/index' : ''
				tabbarIndex === 1 ? this.taburl = '/pages/chit-chat/small-talk/index' : ''
				tabbarIndex === 2 ? this.taburl = '/pages/address-book/address-book-list/index' : ''
				tabbarIndex === 3 ? this.taburl = '/pages/my/me/index' : ''
				wx.navigateTo({
					url: this.taburl,
				})
			}
		}
	}
</script>

<style lang="less">
	.tabbar {
		width: 100%;
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 99;
		box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(208, 208, 208, 0.3);
	}
</style>